<include file="Public/head" />

<body>
  <div class="panel admin-panel margin-top">
    <div class="panel-head" id="add"><strong><span class="icon-pencil-square-o"></span> {:L("bianji")}</strong></div>
    <div class="body-content">
      <form method="post" class="form-x" action="" enctype="multipart/form-data">
        <div class="form-group">
          <div class="label">
            <label>{:L("yonghuming")}：</label>
          </div>
          <div class="field">
            <input type="text" class="input w50" name="nickname" value="{$info['nickname']}" data-validate="required:{:L('qingshuru')}{:L('yonghuming')}" />
            <div class="tips"></div>
          </div>
        </div>
        <!--<div class="form-group">-->
          <!--<div class="label">-->
            <!--<label>{:L("mima")}：</label>-->
          <!--</div>-->
          <!--<div class="field">-->
            <!--<input type="text" class="input w50" name="password" placeholder="{$info['password']}" />-->
            <!--<div class="tips"></div>-->
          <!--</div>-->
        <!--</div>-->
        <div class="form-group">
          <div class="label">
          <label>{:L("yonghutouxiang")}：</label>
          </div>
          <div class="field">
            <input type="file" class="button bg-blue" name="headimgurl" value="+ {:L('liulanshangchuan')}" onchange="preview(this)" style="float: left;">
            <div id="preview" name="img" style="float: left;width: 8%;box-sizing: border-box;" class="input" >
              <empty name="info['headimgurl']">
                <img src="__PUBLIC__/images/zanwu.jpg" width="100%" />
                <else />
                <img src="__ROOT__/{$info['headimgurl']}" width="100%" />
              </empty>
            </div>
            <div class="tips"></div>
          </div>
        </div>
        <div class="form-group">
          <div class="label">
            <label>{:L("xingming")}：</label>
          </div>
          <div class="field">
            <input type="text" class="input w50" name="full_name" value="{$info['full_name']}" />
            <div class="tips"></div>
          </div>
        </div>
        <!--<div class="form-group">-->
          <!--<div class="label">-->
            <!--<label>{:L("tuijianren")}：</label>-->
          <!--</div>-->
          <!--<div class="field">-->
            <!--<span class="input w50" style="background: #ddd">{$info['tuijian']|default="无"}</span>-->
          <!--</div>-->
        <!--</div>-->
        <div class="form-group">
          <div class="label">
            <label>{:L("lianxishouji")}：</label>
          </div>
          <div class="field">
            <input type="text" class="input w50" name="tel" value="{$info['tel']}" />
            <div class="tips"></div>
          </div>
        </div>
        <!--<div class="form-group">-->
          <!--<div class="label">-->
            <!--<label>{:L("weixin")}：</label>-->
          <!--</div>-->
          <!--<div class="field">-->
            <!--<input type="text" class="input w50" name="wechat" value="{$info['wechat']}" />-->
            <!--<div class="tips"></div>-->
          <!--</div>-->
        <!--</div>-->
        <!--<div class="form-group">-->
          <!--<div class="label">-->
            <!--<label>QQ：</label>-->
          <!--</div>-->
          <!--<div class="field">-->
            <!--<input type="text" class="input w50" name="qq" value="{$info['qq']}" />-->
            <!--<div class="tips"></div>-->
          <!--</div>-->
        <!--</div>-->
        <!--<div class="form-group">-->
          <!--<div class="label">-->
            <!--<label>{:L("weibo")}：</label>-->
          <!--</div>-->
          <!--<div class="field">-->
            <!--<input type="text" class="input w50" name="micro_blog" value="{$info['micro_blog']}" />-->
            <!--<div class="tips"></div>-->
          <!--</div>-->
        <!--</div>-->
        <!--<div class="form-group">-->
          <!--<div class="label">-->
            <!--<label>{:L("huiyuanjibie")}：</label>-->
          <!--</div>-->
          <!--<div class="field">-->
            <!--<select name="power" class="input w50">-->
              <!--<option value="0" <if condition="$info['power'] eq 0">selected="selected"</if>>{:L("putonghuiyuan")}</option>-->
              <!--<option value="0" <if condition="$info['power'] eq 1">selected="selected"</if>>{:L("gaojihuiyuan")}</option>-->
            <!--</select>-->
            <!--<div class="tips"></div>-->
          <!--</div>-->
        <!--</div>-->
        <div class="form-group">
          <div class="label">
            <label></label>
          </div>
          <div class="field">
            <button class="button bg-main icon-check-square-o" type="submit"> {:L("tijiao")}</button>
          </div>
        </div>
      </form>
    </div>
  </div>
  <script type="text/javascript">
    function preview(file){
      var prevDiv = document.getElementById('preview');
      if (file.files && file.files[0]){
        var reader = new FileReader();
        reader.onload = function(evt){
          prevDiv.innerHTML = '<img src="' + evt.target.result + '" width="100%" />';
        }
        reader.readAsDataURL(file.files[0]);
      }
      else{
        prevDiv.innerHTML = '<div class="img" style="filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale,src=\'' + file.value + '\'"></div>';
      }
    }
  </script>
</body>

</html>